<?php $all_session = $this->session->all_userdata(); ?>
<!DOCTYPE html>
<!-- saved from url=(0056)http://startbootstrap.com/templates/simple-sidebar.html# -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Panel</title>
<script src="<?php echo base_url();?>js/chart.js"></script>
<?php $this->load->view('panel_head');?>
</head>

<body>
<style>
.dots {
	table-layout:fixed;
}

.dots p {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
</style>
<?php $this->load->view('header');?>
<div style="height:46px;"></div>

<div > 
  
 
  
  <!-- Page content -->
  <div id="page-content-wrapper">
  
   
    <!-- Keep all page content within the page-content inset div! -->
    
    <div class="page-content inset">
    <div class="panel panel-default">
        <div class="panel-body">
         <h1><span class="glyphicon glyphicon-list-alt"></span>&nbsp;My favorite</h1>
      <div class="row" style="margin-bottom:1em;">
        <div class="col-md-12" >
          <div style="float:left"> <a href="<?php echo base_url();?>index.php/pvdo/upload">
          <!--
            <button type="button" class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span>&nbsp;Upload New Video</button>
            -->
            </a> </div>
          <span style="float:right">
          <!--
          <?php echo form_open('pvdo/search');?>
          		<input type="text" class="form-control" placeholder="  Search videos..." name="search">
          <?php echo form_close();?><br>
		  -->
          </span>
          <div style="float:right"></div>
        </div>
        <!-- <div class="col-md-12"> --> 
        
      </div>
      <!-- <div class="row"> -->
      
      <div class="row" style="margin-bottom:1em;" >
        <div class="col-md-12">
       <!--
          <div style="float:left"> All (<?php echo count($vdo);?>) | Public (<?php echo $sum_public; ?>	) | Private (<?php echo $sum_private; ?>) |  Banned (<?php echo $sum_ban; ?>) </div>
          
          -->
          
          <!--
          <div style="float:right"> <?php echo count($vdo);?> items </div>
          -->
        </div>
        <!-- <div class="col-md-12"> --> 
      </div>
      <!-- <div class"row"> -->
      

      
     

    
      <div class="pagination" style="float:left; margin:0 0 1.6em 0; padding:0;">
        <?php 	echo $this->pagination->create_links(); ?>
        

        </div><!-- pagination -->
   
   			
            <!--
           <div style="float:right;">
    <?php if($this->uri->segment(2) == 'search') { ?> 
         	<?php echo form_open('pvdo/search');?>
    <?php } else { ?>
   			<?php echo form_open('pvdo/index');?>
    <?php } ?>
             <select class="form-control" style="width:16em;" name="result_by" id="result_by" onChange="this.form.submit()" >
             	  <?php if($this->input->post('result_by') == 'vdo.vdo_id') { ?>
                  		<option value="vdo.vdo_id">-- result by No. --</option>
                  <?php } ?>
                  <?php if($this->input->post('result_by') == 'vdo_name') { ?>
                  		<option value="vdo_name">-- result by name --</option>
                  <?php } ?>
                  <?php if($this->input->post('result_by') == 'vdo_uploadtime') { ?>
                  		<option value="vdo_uploadtime">-- result by uploaded time --</option>
                  <?php } ?>
                  <option value="vdo.vdo_id">result by No.</option>
                  <option value="vdo_name">result by name</option>
                  <option value="vdo_uploadtime">result by uploaded time</option>
                </select>
  		   <?php echo form_close();?>
      		</div>
            
            -->
  
     

           
          <?php echo form_open('favorite/delete_favorite');?>
        <table class="table table-bordered"> 
          <tr class="bg-primary">
            <td colspan="6"><div style="float:left; margin:0 1em 0 0;">
                <input type="checkbox" name="select_all" id="select_all" style="width:1.7em; height:1.7em;" value="Y">
              </div>
              <!--
              <span style="text-align:center">
              <select class="form-control" style="width:8em;" name="status">
                <option>Bulk Action</option>
                <option>-----------</option>
                <option value="0">Public</option>
                <option value="1">Private</option>
                <option value="2">Ban</option>
              </select>
             
              </span>
              -->
              <button type="submit" class="btn btn-default" data-dismiss="modal">Delete a Favorite</button>
              
              
              
 
              <div style="float:right;">
              
             
                
             
                
              
              </div></td>
          </tr>
        </table>
    
      <!-- <div class="table-responsive"> -->
      
      <div style="margin-left:0.7em;">
        
        <?php $i=1; ?>
        <?php foreach($vdo as $vdo) { ?>

        <!-- <div class"row"> -->
        
        <div class="row" style="margin-bottom:1.5em;">
          <div class="col-md-2">
            <div style="float:left;">
            	
              <input type="checkbox" name="select_all[]"style="width:1.7em; height:1.7em;" value="<?php echo $vdo['fav_id'];?>">
            </div>
            <div align="center"> <a href="<?php echo base_url();?>index.php/player/cs/<?php echo $vdo['vdo_id']; ?>"><img src="<?php echo base_url();?>vod_thumb/<?php echo $vdo['vdo_rawfile'];?>/<?php echo $vdo['thumb_name'];?>"/ width="80%"> </a> </div>
          </div>
          <!-- <div class="col-md-2"> -->
          <div class="col-md-6" >
            <div><a href="<?php echo base_url();?>index.php/player/cs/<?php echo $vdo['vdo_id']; ?>"><?php echo $vdo['vdo_name']; ?></a></br>
              <!--
              <font size="-2"><?php echo $vdo['vdo_uploadtime'];?></font></br><br>
				-->
              
               
                <div class="dots" style="width:70%;">
                      <p style="height:5em;"> <?php echo $vdo['vdo_des'];?> </p>
                    </div>
                
              <!--
              <ul class="nav nav-pills" >
                <li> <a data-toggle="dropdown" href="#" style="padding:0.05em 0.5em;"><font size="2"><strong>edit</strong> <b class="caret"></b></font></a>
                  <ul class="dropdown-menu" >
                    <li ><a href="<?php echo base_url();?>index.php/pvdo/profile/<?php echo $vdo['vdo_id']; ?>">Information and Setting</a></li>
                    <li class="divider"></li>
                    <li ><a href="#">Delete</a></li>
                  </ul>
                </li>
              </ul>
              -->
              
              <!-- /pills --> 
              
            </div>
            <?php echo form_close();?>
          </div>
          <!-- <div class="col-md-8"> -->
          
          <div class="col-md-2" style="margin-top:1em;">
          <?php if($vdo['vdo_status'] == 0) { ?>
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-right:1em"><font color="#5cb85c"><span class="glyphicon glyphicon-globe"></span></font></button>
		<?php } ?>
        	<?php if($vdo['vdo_status'] == 1) { ?>
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-right:1em"><font color="f0ad4e"><span class="
glyphicon glyphicon-remove-sign"></span></font></button>
            <?php } ?>
            <?php if($vdo['vdo_status'] == 2) { ?>
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-right:1em"><font color="d9534f"><span class="
glyphicon glyphicon-ban-circle"></span></font></button>
            <?php } ?>
           
          </div>
          <!-- <div class="col-md-3"> -->
          <div class="col-md-2">
            <table>
              <tr>
                <td><span class="
glyphicon glyphicon-stats"></span> <?php echo $vdo['vdo_view'];?></td>
              </tr>
              <tr>
                <td><span class="glyphicon glyphicon-thumbs-up"></span> <?php echo $this->player_model->like($vdo['vdo_id']); ?></td>
                <td><span class="glyphicon glyphicon-thumbs-down"></span> <?php echo $this->player_model->dislike($vdo['vdo_id']); ?></td>
              </tr>
              <tr>
              <!--
                <td><span class="glyphicon glyphicon-exclamation-sign"></span> <?php echo count($this->pvdo_model->report($vdo['vdo_id']));?></td>
                -->
              </tr>
            </table>
          </div>
          <!-- <div class="col-md-3"> --> 
        </div>
        <!-- <div class"row"> -->
     	<?php $i++; } ?>   
        
     
        
      </div>
      <!-- <div margin> --> 
      
      <div class="pagination" style="margin:0; padding:0;">
        <?php 	echo $this->pagination->create_links(); ?>
        </div><!-- pagination -->
      
      
      
      
       </div>
        <!-- <div class="panel-body"> --> 
      </div>
      <!-- <div class="panel panel-default"> --> 
      
      
      
    </div>
    <!-- <div class="page-content inset"> --> 
    
  </div>
  <!--  <div id="page-content-wrapper"> --> 
  </div>
</div>
<!-- <div id="wrapper"> --> 


<!-- Custom JavaScript for the Menu Toggle --> 
<script>
    $("#menu-toggle").click(function(e) {
        e.preventDefault();
        $("#wrapper").toggleClass("active");
    });
</script> 

<!-- checkbox --> 
<script>
$('#select_all').click(function(event) {   
    if(this.checked) {
        // Iterate each checkbox
        $(':checkbox').each(function() {
            this.checked = true;                        
        });
    }else{
		$(':checkbox').each(function() {
			this.checked = false;
		});
	}
});
</script>
</body>
</html>